You are here: Function Reference > Alphabetical Listing > A AddSubForm

AddSubForm

Use this procedure/function to add a sections from a subform into the current document.

Syntax

AddSubform (Form, Section, Form, Group, Flag)

Parameter

Description

Defaults

Form (Subform

The name of the subform.

.

No Default

Section

Enter the name of a section which will precede the new subform

The current section

Form

Enter the name of a form in the form set. If you specify the Section parameter, that section must occur on this form. .

The current form

Group

Enter the name of a group that contains the specified form.

The current group.

Flag

Determines if the section is inserted on the same page or on a new page.

0 - (zero) new page
1 - same page

zero (0).

Optionally, this procedure returns one (1) on success or zero (0) on failure.

This procedure adds a copy of each section in the specified subform to a form. The system loads the new sections onto the page after the section, form, or group you specified or onto a new page which it creates after the section, form, or group you specified.

Note

Example

Here are some examples:

Procedure

Result

Explanation

AddSubform ("SEC1")

1 - if successfully added

0 - if not added

Insert the sections from subform IMG1, on a new page after the current page.

.

AddSubform("NEW1", "SEC\3",,"GRP")

1 - if successfully added

0 - if not added

Insert the sections from subform NEW1, after the third occurrence of IMG, within GRP. This section is placed on a new page after the third occurrence of the specified section.

AddSubform ("SEC1",,,, 1)

1 - if successfully added

0 - if not added.

Insert the sections from subform IMG1, after the current section on the same page

AddSubform("NEW1", "SEC\3", , , 1)

1 - if successfully added

0 - if not added

Insert the sections from subform NEW1, after the third occurrence of IMG on the same page

Use this procedure/function to add a sections from a subform into the current document

See also